package com.sc.nft.feign;


import com.sc.nft.req.auth.WxCodeReq;
import com.sc.nft.sup.Result;
import com.sc.nft.vo.auth.GetUserMobileNumberVO;
import com.sc.nft.vo.auth.GetUserOpenIdVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author JYT
 * @create 2024/4/27 11:29
 */
@FeignClient(name = "meta-mall-mini-app", path = "/wxMiniMall/auth")
public interface WxMiniLogInClient {


    /**
     * 获取用户openId
     * @param request
     * @return
     */
    @PostMapping(value = "/getOpenId", produces = MediaType.APPLICATION_JSON_VALUE)
    GetUserOpenIdVO getOpenId(WxCodeReq request);

    /**
     * 获取用户手机号码
     * @param request
     * @return
     */
    @PostMapping(value = "/getMobileNumber", produces = MediaType.APPLICATION_JSON_VALUE)
    GetUserMobileNumberVO getMobileNumber(WxCodeReq request);



    /**
     * 获取accessToken
     * @return
     */
    @GetMapping(value = "/getAccessToken", produces = MediaType.APPLICATION_JSON_VALUE)
    String getAccessToken();
}
